import 'package:jinke/page/pro_list/subs/pro_detail/subs/pro_progress_day/pro_file_model.dart';

class ProProgressDayModel {
  String? id;
  String? reportDate;
  String? reportEvolve;
  String? tagsDay;
  String? tagsMonth;
  String? projectId;
  String? projectPhase;
  String? projectName;
  String? projectAlias;
  String? projectPhaseCn;
  String? phaseStatusCn;
  String? phaseStatusUptTime;
  String? specialType;
  String? specialTypeCn;
  int? reportType;
  String? reportTypeCn;
  String? reportUserId;
  String? reportUserName;
  String? reportEvolveContent;
  String? reportTime;
  String? editReportUserId;
  String? editReportUserName;
  String? editReportEvolveContent;
  String? editReportTime;
  String? isRead;
  String? isGenerateGatherReport;
  String? editUserRole;
  List<ProFileModel>? files;

  ProProgressDayModel({
    this.id,
    this.reportDate,
    this.reportEvolve,
    this.tagsDay,
    this.tagsMonth,
    this.projectId,
    this.projectPhase,
    this.projectName,
    this.projectAlias,
    this.projectPhaseCn,
    this.phaseStatusCn,
    this.phaseStatusUptTime,
    this.specialType,
    this.specialTypeCn,
    this.reportType,
    this.reportTypeCn,
    this.reportUserId,
    this.reportUserName,
    this.reportEvolveContent,
    this.reportTime,
    this.editReportUserId,
    this.editReportUserName,
    this.editReportEvolveContent,
    this.editReportTime,
    this.isRead,
    this.isGenerateGatherReport,
    this.editUserRole,
    this.files,
  });

  factory ProProgressDayModel.fromJson(Map<String, dynamic> json) {
    var _files = json['files'];
    List<ProFileModel> files = [];
    if (_files is List) {
      files = _files.map((e) => ProFileModel.fromJson(e)).toList();
    }
    return ProProgressDayModel(
      id: json['id'] as String?,
      reportDate: json['reportDate'] as String?,
      reportEvolve: json['reportEvolve'] as String?,
      tagsDay: json['tagsDay'] as String?,
      tagsMonth: json['tagsMonth'] as String?,
      projectId: json['projectId'] as String?,
      projectPhase: json['projectPhase'] as String?,
      projectName: json['projectName'] as String?,
      projectAlias: json['projectAlias'] as String?,
      projectPhaseCn: json['projectPhaseCn'] as String?,
      phaseStatusCn: json['phaseStatusCn'] as String?,
      phaseStatusUptTime: json['phaseStatusUptTime'] as String?,
      specialType: json['specialType'] as String?,
      specialTypeCn: json['specialTypeCn'] as String?,
      reportType: json['reportType'] as int?,
      reportTypeCn: json['reportTypeCn'] as String?,
      reportUserId: json['reportUserId'] as String?,
      reportUserName: json['reportUserName'] as String?,
      reportEvolveContent: json['reportEvolveContent'] as String?,
      reportTime: json['reportTime'] as String?,
      editReportUserId: json['editReportUserId'] as String?,
      editReportUserName: json['editReportUserName'] as String?,
      editReportEvolveContent: json['editReportEvolveContent'] as String?,
      editReportTime: json['editReportTime'] as String?,
      isRead: json['isRead'] as String?,
      isGenerateGatherReport: json['isGenerateGatherReport'] as String?,
      editUserRole: json['editUserRole'] as String?,
      files: files,
    );
  }

  Map<String, dynamic> toJson() => {
        'id': id,
        'reportDate': reportDate,
        'reportEvolve': reportEvolve,
        'tagsDay': tagsDay,
        'tagsMonth': tagsMonth,
        'projectId': projectId,
        'projectPhase': projectPhase,
        'projectName': projectName,
        'projectAlias': projectAlias,
        'projectPhaseCn': projectPhaseCn,
        'phaseStatusCn': phaseStatusCn,
        'phaseStatusUptTime': phaseStatusUptTime,
        'specialType': specialType,
        'specialTypeCn': specialTypeCn,
        'reportType': reportType,
        'reportTypeCn': reportTypeCn,
        'reportUserId': reportUserId,
        'reportUserName': reportUserName,
        'reportEvolveContent': reportEvolveContent,
        'reportTime': reportTime,
        'editReportUserId': editReportUserId,
        'editReportUserName': editReportUserName,
        'editReportEvolveContent': editReportEvolveContent,
        'editReportTime': editReportTime,
        'isRead': isRead,
        'isGenerateGatherReport': isGenerateGatherReport,
        'editUserRole': editUserRole,
        'files': files?.map((e) => e.toJson()).toList(),
      };
}
